home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / sound / speech / talkspk.arc / C_SPEAK.S next >
Encoding:
Text File  |  1991-09-14  |  1.4 KB  |  54 lines

  1. | c_speak.s (alcyon version, circa 18 sept 1990)
  2. |
  3. | $Log: c_speak.s,v $
  4. | Revision 2.1  1991/09/14  21:13:34  rosenkra
  5. | clean up for release to atari.archive.
  6. |
  7. | Revision 2.0  1991/09/14  15:52:28  rosenkra
  8. | port to GNU C. assembler still needed, though it could be inlined.
  9. | it won't be portable anyway and this is just as easy. this is for
  10. | the GAS assembler.
  11. |
  12. | Revision 1.0  1991/09/14  01:51:22  rosenkra
  13. | Initial revision
  14. |
  15. |
  16. | this is the inline assembler from talk.c which calls speak.tos in 2 passes
  17. | the first is to translate the ascii string into phonemes and the second
  18. | actually does the talking. i found it much easier to get this to work with
  19. | a seperate .s file rather than trying to figure out inline assembler.
  20. |
  21. | note the registers MUST be saved. i am not sure which so i save them all.
  22. |
  23. | compile this with gas (GNU).
  24. |
  25.  
  26.     .text
  27.  
  28. rcsid_c_speak_s:
  29.     .ascii    "$Id: c_speak.s,v 2.1 1991/09/14 21:13:34 rosenkra Exp $\0"
  30.  
  31.     .even
  32.  
  33. .globl    _c_speak            | this module
  34. .globl    _program            | -> to speak.tos start
  35.  
  36. _c_speak:
  37.     moveml    a0-a6/d0-d7,sp@-    | save all registers. speak kills 'em
  38.  
  39.     movel    #50,d0            | set up first jump..
  40.     addl    _program,d0
  41.     movel    d0,a2
  42.     jbsr    a2@            | go!
  43.  
  44.     movel    #136,d0            | set up second jump...
  45.     addl    _program,d0
  46.     movel    d0,a2
  47.     jbsr    a2@            | now speak
  48.  
  49.  
  50.     moveml    sp@+,a0-a6/d0-d7    | restore registers
  51.  
  52.     rts
  53.  
  54.